import request from '@/utils/request2'
import { materialApiUrl } from '../../config'


export default {
    //云筑网-新增附件
    addFile(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/addFile', method: 'post', params, data
        })
    },
    //云筑网-新增附件
    addFileUrl(data, params) {
        return materialApiUrl + '/materials/material-contract-yunzhu/addFile'
    },
    // 云筑网--物资明细-行新增
    createByDetails(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/createByDetails', method: 'post', params, data
        })
    },
    //
    // 云筑网-新增
    createByMain(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/createByMain', method: 'post', params, data
        })
    },
    //
    // 云筑网-物资明细-行删除
    deleteByDetails(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/deleteByDetails', method: 'post', params, data
        })
    },
    //
    // 云筑网-删除
    deleteByMain(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/deleteByMain', method: 'post', params, data
        })
    },
    //
    // 云筑网-删除附件
    deleteFile(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/deleteFile', method: 'post', params, data
        })
    },
    // 云筑网-删除附件
    deleteFileUrl(data, params) {
        return materialApiUrl + '/materials/material-contract-yunzhu/deleteFile'
    },
    //
    // 云筑网--物资明细-行编辑
    editByDetails(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/editByDetails', method: 'post', params, data
        })
    },
    //
    // 云筑网-编辑
    editByMain(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/editByMain', method: 'post', params, data
        })
    },
    // 物云筑网-附件列表
    findFileList(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/findFileList', method: 'get', params, data
        })
    },
    // 物云筑网-附件列表
    findFileListUrl(data, params) {
        return materialApiUrl + '/materials/material-contract-yunzhu/findFileList'
    },
    //
    // 云筑网-物资明细-分页查询
    findListByDetails(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/findListByDetails', method: 'get', params, data
        })
    },
    //
    // 云筑网-分页查询
    findListByMain(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/findListByMain', method: 'get', params, data
        })
    },
    //
    // 云筑网-详情
    findListByMainId(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/findListByMainId/' + params.id,
            method: 'get',
            params,
            data
        })
    },
    ///
    // 云筑网-提交审批
    submitApply(data, params) {
        return request({
            url: materialApiUrl + '/materials/material-contract-yunzhu/submitApply', method: 'post', params, data
        })
    }
}
